<template>
  <el-select placeholder="选择状态" :value="mval" @change="selectHandler" :clearable=true>
    <el-option v-for="(item,index) in list" :key="index" :label="item.name" :value="item.type"></el-option>
  </el-select>
</template>

<script>
  export default {
    name: "AvailableSelect",
    model: {
      prop: 'mval',
      event: 'modelValue'
    },
    props: ['mval'],
    data() {
      return {
        list: [
          {name: '全部', type: ''},
          {name: '正在呈批', type: '3'},
          {name: '审核中', type: '5'},
          {name: '同意销假', type: '1'},
          {name: '不同意销假', type: '2'}
        ]
      }
    },
    methods: {
      selectHandler: function (val) {
        this.$emit('modelValue', val)
      }
    }
  }
</script>
